Clean up ImageBitmapRenderingContext tests
diff --git a/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource.html b/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource.html index 1dbfa2b..21c5ea4 100644 --- a/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource.html +++ b/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource.html
@@ -23,9 +23,9 @@ createImageBitmap(myCanvas).then(t.step_func_done(function(imageBitmap) { // Per spec, when transferFromImageBitmap happens, the transferred - // ImageBitmap (|image| here) should be the intrinsic size of + // ImageBitmap (|image| here) must determine the intrinsic size of // myCanvas, and hence myCanvas.width/height is ignored. Therefore, - // this created |imageBitmap| should have the same size as the |image|. + // |imageBitmap| should have the same size as the |image|. assert_equals(imageBitmap.width, width); assert_equals(imageBitmap.height, height); diff --git a/imagebitmap-renderingcontext/context-creation-with-alpha.html b/imagebitmap-renderingcontext/context-creation-with-alpha.html index 88d12d1..4354b9a 100644 --- a/imagebitmap-renderingcontext/context-creation-with-alpha.html +++ b/imagebitmap-renderingcontext/context-creation-with-alpha.html
@@ -43,7 +43,7 @@ var ctx = srcCanvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; ctx.fillRect(0, 0, width, height); - createImageBitmap(srcCanvas).then(function(image) { + return createImageBitmap(srcCanvas).then(function(image) { consumeImageBitmap(image, 'false', 0, 127, 0, 255); }); }, "Test that an ImageBitmapRenderingContext with alpha disabled makes the canvas opaque"); @@ -55,7 +55,7 @@ var ctx = srcCanvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; ctx.fillRect(0, 0, width, height); - createImageBitmap(srcCanvas).then(function(image) { + return createImageBitmap(srcCanvas).then(function(image) { consumeImageBitmap(image, 'true', 0, 255, 0, 127); }); }, "Test that an ImageBitmapRenderingContext with alpha enabled preserves the alpha"); @@ -67,7 +67,7 @@ var ctx = srcCanvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; ctx.fillRect(0, 0, width, height); - createImageBitmap(srcCanvas).then(function(image) { + return createImageBitmap(srcCanvas).then(function(image) { consumeImageBitmap(image, '', 0, 255, 0, 127); }); }, "Test that the 'alpha' context creation attribute is true by default"); diff --git a/imagebitmap-renderingcontext/transferFromImageBitmap-detached.html b/imagebitmap-renderingcontext/transferFromImageBitmap-detached.html index 2c547ee..c0ae841 100644 --- a/imagebitmap-renderingcontext/transferFromImageBitmap-detached.html +++ b/imagebitmap-renderingcontext/transferFromImageBitmap-detached.html
@@ -28,7 +28,7 @@ var ctx = srcCanvas.getContext('2d'); ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; ctx.fillRect(0, 0, width, height); - createImageBitmap(srcCanvas).then(testException); + return createImageBitmap(srcCanvas).then(testException); }, "Test transferFromImageBitmap(image) with a detached image should throw InvalidStateError"); </script>